package cn.wh.proxy;

import cn.wh.Fly;

import java.lang.reflect.Proxy;

/**
 * @Author wanghao
 * @Date 2022-05-16 22:27
 * @Description: TODO
 */
public class ProxyTest {
    public static void main(String[] args) {
        ProxyDemo proxy = new ProxyDemo(Fly.class, "你好么");
        Fly fly = (Fly) Proxy.newProxyInstance(Fly.class.getClassLoader(), new Class[]{Fly.class}, proxy);
        fly.run();
    }
}
